/* ========================================
   滑动验证组件样式
   ======================================== */

/* 滑动验证组件容器 */
.slider-captcha-container {
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(24, 144, 255, 0.1);
}

/* ========================================
   组件头部样式
   ======================================== */

/* 头部容器 */
.slider-captcha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
}

/* 标题文本 */
.slider-captcha-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* 操作按钮区域 */
.slider-captcha-actions {
  display: flex;
  gap: 8px;
}

/* 刷新按钮 */
.slider-captcha-refresh {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
  color: #1890ff;
}

/* 刷新按钮悬停状态 */
.slider-captcha-refresh:hover {
  background: rgba(24, 144, 255, 0.1);
}

/* ========================================
   图片验证区域样式
   ======================================== */

/* 图片容器 */
.slider-captcha-image-container {
  padding: 16px;
  position: relative;
}

/* 背景图片 */
.slider-captcha-image {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 背景纹理效果 */
.slider-captcha-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

/* 目标位置指示器 */
.slider-captcha-target {
  position: absolute;
  border: 2px dashed #1890ff;
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(24, 144, 255, 0.05) 100%);
  border-radius: 6px;
  pointer-events: none;
  animation: targetPulse 2s infinite;
  backdrop-filter: blur(2px);
}

/* 目标位置标签 */
.slider-captcha-target::before {
  content: "目标";
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #1890ff;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
  border: 1px solid rgba(24, 144, 255, 0.1);
}

/* 目标位置脉冲动画 */
@keyframes targetPulse {
  0%, 100% {
    border-color: #1890ff;
    background: rgba(24, 144, 255, 0.1);
  }
  50% {
    border-color: #40a9ff;
    background: rgba(24, 144, 255, 0.2);
  }
}

/* 可拖拽拼图块 */
.slider-captcha-puzzle-piece {
  position: absolute;
  border: 2px solid #1890ff;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  border-radius: 6px;
  cursor: grab;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(24, 144, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  backdrop-filter: blur(5px);
}

/* 拼图块标签 */
.slider-captcha-puzzle-piece::before {
  content: "拖动";
  font-size: 10px;
  color: #1890ff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 拼图块悬停状态 */
.slider-captcha-puzzle-piece:hover {
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.3);
  transform: scale(1.05) translateY(-2px);
  border-color: #40a9ff;
}

/* 拼图块激活状态 */
.slider-captcha-puzzle-piece:active {
  cursor: grabbing;
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 8px 25px rgba(24, 144, 255, 0.4);
}

/* ========================================
   滑块拖拽区域样式
   ======================================== */

/* 滑块容器 */
.slider-captcha-slider-container {
  padding: 0 16px 16px;
}

/* 滑块轨道 */
.slider-captcha-track {
  position: relative;
  height: 32px;
  background: #f5f5f5;
  border-radius: 16px;
  border: 1px solid #d9d9d9;
  margin-bottom: 8px;
  overflow: hidden;
}

/* 进度条 */
.slider-captcha-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
  border-radius: 16px;
  transition: width 0.1s ease;
  z-index: 1;
}

/* 滑块 */
.slider-captcha-slider {
  position: absolute;
  top: 0;
  width: 32px;
  height: 32px;
  background: #1890ff;
  border-radius: 50%;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
  user-select: none;
  z-index: 10;
}

/* 滑块悬停状态 */
.slider-captcha-slider:hover {
  background: #40a9ff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

/* 滑块拖动状态 */
.slider-captcha-slider.dragging {
  cursor: grabbing;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.5);
}

/* 滑块箭头图标 */
.slider-captcha-arrow {
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* 操作说明文本 */
.slider-captcha-instruction {
  text-align: center;
  color: #666;
  font-size: 12px;
  line-height: 1.4;
}

/* 调试信息 */
.slider-captcha-debug {
  margin-top: 4px;
  font-size: 10px;
  color: #999;
  font-family: monospace;
}

/* ========================================
   验证结果样式
   ======================================== */

/* 验证结果提示框 */
.slider-captcha-result {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  animation: resultShow 0.4s ease-out;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 验证成功样式 */
.slider-captcha-result.success {
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
  color: #52c41a;
  border: 2px solid #b7eb8f;
  animation: resultShow 0.4s ease-out, successGlow 2s infinite;
}

/* 验证失败样式 */
.slider-captcha-result.fail {
  background: linear-gradient(135deg, #fff2f0 0%, #ffd6d6 100%);
  color: #ff4d4f;
  border: 2px solid #ffccc7;
  animation: resultShow 0.4s ease-out;
}

/* ========================================
   其他元素样式
   ======================================== */

/* 组件水印 */
.slider-captcha-watermark {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 10px;
  color: #ccc;
  pointer-events: none;
}

/* ========================================
   动画效果
   ======================================== */

/* 结果显示动画 */
@keyframes resultShow {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) rotate(-5deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

/* 成功发光动画 */
@keyframes successGlow {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(82, 196, 26, 0.3);
  }
  50% {
    box-shadow: 0 8px 30px rgba(82, 196, 26, 0.6);
  }
} 